package dataFormat;

import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;

public class FBUser implements Parcelable {
	private String id, name;
	private Bitmap photo;
	
	public FBUser(String id, String name, Bitmap photo) {
		super();
		this.id = id;
		this.name = name;
		this.photo = photo;
	}
	
	public FBUser(Parcel in) {
		id = in.readString();
		name = in.readString();
		photo = in.readParcelable(null);
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Bitmap getPhoto() {
		return photo;
	}

	public void setPhoto(Bitmap photo) {
		this.photo = photo;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(name);
		dest.writeParcelable(photo, 0);
	}
	
	@SuppressWarnings("rawtypes")
	public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
        public FBUser createFromParcel(Parcel in) {
        	return new FBUser(in);
        }
 
        public FBUser[] newArray(int size) {
            return new FBUser[size];
        }
    };
}
